<?php 

echo"<div>";

//include "db_connect.php";

$con = mysql_connect("localhost","root","root");
mysql_select_db("mydb");

$result1 = mysql_query("select * from orders") or die("kan niet uitvoeren");
$result2 = mysql_query("select * from bestelling") or die ("kan niet uitvoren") ;
$fields1 = mysql_query("show columns from bestelling") or die ("kan fields niet uitvoren") ;




echo "<table border='1'>";
echo"<tr>";
while($fields2 =mysql_fetch_array($fields1 )){
echo"<td>".$fields2[0] ."</td>";
}
echo"</tr>";
while($orders = mysql_fetch_assoc($result2)){
echo "<tr>";
foreach($orders as $colom => $value) 
{
echo "<td>" . $value. "</td>";
}
echo"</tr>";
}

//<td>ordernr</td> <td>datum gemaakt</td> <td> totaal</td> <td> detaillink</td>   <td>afhandelen </td>



echo"</table>";



echo"</div>";
?>
